#ifndef MOTOR_DRV_Hpp
#define MOTOR_DRV_Hpp
#include <chrono>
#include <memory>
#include <iostream>
#include <vector>
#include "Serial.hpp"

class Motor_drv : public Serial
{
 public:
     Motor_drv(std::string port, int baud);
     ~Motor_drv(){}
    int rec_ok(std::vector<u_int8_t> &msg);
    void set_send_v(int n,int id);
    virtual void recvMsg(std::vector<u_int8_t> &msg) override;
    virtual void startTimer(int ms_s)override;
    int cal_angle_run(int agg);
    void set_speed(int sp,int angle);
    int bianma_id=0x0111;
    int motor_lun0_id=0x151;
    int motor_lun1_id=0x152;
    int angle_cur=0;
    int speed_cur0,speed_cur1;
    int speed_set0,speed_set1;
    int Fucn_flag=0;
    int speed_set=0;
};


#endif
